Optimal. Leaf size=103 \[ -\frac {\left (a^2+6 a b+6 b^2\right ) \cot (e+f x)}{f}+\frac {2 b (a+2 b) \tan (e+f x)}{f}-\frac {(a+b)^2 \cot ^5(e+f x)}{5 f}-\frac {2 (a+b) (a+2 b) \cot ^3(e+f x)}{3 f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4132, 448} \[ -\frac {\left (a^2+6 a b+6 b^2\right ) \cot (e+f x)}{f}+\frac {2 b (a+2 b) \tan (e+f x)}{f}-\frac {(a+b)^2 \cot ^5(e+f x)}{5 f}-\frac {2 (a+b) (a+2 b) \cot ^3(e+f x)}{3 f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 448
Rule 4132
Rubi steps
\begin {align*} \int \csc ^6(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^2 \left (a+b+b x^2\right )^2}{x^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left (2 b (a+2 b)+\frac {(a+b)^2}{x^6}+\frac {2 (a+b) (a+2 b)}{x^4}+\frac {a^2+6 a b+6 b^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\left (a^2+6 a b+6 b^2\right ) \cot (e+f x)}{f}-\frac {2 (a+b) (a+2 b) \cot ^3(e+f x)}{3 f}-\frac {(a+b)^2 \cot ^5(e+f x)}{5 f}+\frac {2 b (a+2 b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.57, size = 353, normalized size = 3.43 \[ -\frac {\csc (e) \sec (e) \csc ^5(e+f x) \sec ^3(e+f x) \left (-32 \left (2 a^2+9 a b+12 b^2\right ) \sin (2 f x)-24 a^2 \sin (2 (e+f x))+8 a^2 \sin (4 (e+f x))+8 a^2 \sin (6 (e+f x))-4 a^2 \sin (8 (e+f x))+8 a^2 \sin (2 (e+2 f x))+40 a^2 \sin (4 e+2 f x)+8 a^2 \sin (4 e+6 f x)-4 a^2 \sin (6 e+8 f x)-108 a b \sin (2 (e+f x))+36 a b \sin (4 (e+f x))+36 a b \sin (6 (e+f x))-18 a b \sin (8 (e+f x))+96 a b \sin (2 (e+2 f x))+96 a b \sin (4 e+6 f x)-48 a b \sin (6 e+8 f x)+20 a (5 a+12 b) \sin (2 e)-54 b^2 \sin (2 (e+f x))+18 b^2 \sin (4 (e+f x))+18 b^2 \sin (6 (e+f x))-9 b^2 \sin (8 (e+f x))+128 b^2 \sin (2 (e+2 f x))+128 b^2 \sin (4 e+6 f x)-64 b^2 \sin (6 e+8 f x)\right )}{1920 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 139, normalized size = 1.35 \[ -\frac {8 \, {\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} \cos \left (f x + e\right )^{8} - 20 \, {\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} \cos \left (f x + e\right )^{6} + 15 \, {\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 10 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 5 \, b^{2}}{15 \, {\left (f \cos \left (f x + e\right )^{7} - 2 \, f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 151, normalized size = 1.47 \[ \frac {5 \, b^{2} \tan \left (f x + e\right )^{3} + 30 \, a b \tan \left (f x + e\right ) + 60 \, b^{2} \tan \left (f x + e\right ) - \frac {15 \, a^{2} \tan \left (f x + e\right )^{4} + 90 \, a b \tan \left (f x + e\right )^{4} + 90 \, b^{2} \tan \left (f x + e\right )^{4} + 10 \, a^{2} \tan \left (f x + e\right )^{2} + 30 \, a b \tan \left (f x + e\right )^{2} + 20 \, b^{2} \tan \left (f x + e\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{\tan \left (f x + e\right )^{5}}}{15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.69, size = 190, normalized size = 1.84 \[ \frac {a^{2} \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (f x +e \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (f x +e \right )\right )}{15}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {1}{5 \sin \left (f x +e \right )^{5} \cos \left (f x +e \right )}-\frac {2}{5 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {8}{5 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {16 \cot \left (f x +e \right )}{5}\right )+b^{2} \left (-\frac {1}{5 \sin \left (f x +e \right )^{5} \cos \left (f x +e \right )^{3}}+\frac {8}{15 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )^{3}}-\frac {16}{15 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {64}{15 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {128 \cot \left (f x +e \right )}{15}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 107, normalized size = 1.04 \[ \frac {5 \, b^{2} \tan \left (f x + e\right )^{3} + 30 \, {\left (a b + 2 \, b^{2}\right )} \tan \left (f x + e\right ) - \frac {15 \, {\left (a^{2} + 6 \, a b + 6 \, b^{2}\right )} \tan \left (f x + e\right )^{4} + 10 \, {\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{\tan \left (f x + e\right )^{5}}}{15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.80, size = 108, normalized size = 1.05 \[ \frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {\frac {2\,a\,b}{5}+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (a^2+6\,a\,b+6\,b^2\right )+\frac {a^2}{5}+\frac {b^2}{5}+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {2\,a^2}{3}+2\,a\,b+\frac {4\,b^2}{3}\right )}{f\,{\mathrm {tan}\left (e+f\,x\right )}^5}+\frac {2\,b\,\mathrm {tan}\left (e+f\,x\right )\,\left (a+2\,b\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________